package com.o2opuzi.lib.email;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;

import org.springframework.core.io.InputStreamSource;

public class AttachmentInputStreamSource implements InputStreamSource{

	private byte[] data;
	
	@Override
	public InputStream getInputStream() throws IOException {
		return new ByteArrayInputStream(data); 
	}

	public byte[] getData() {
		return data;
	}

	public void setData(byte[] data) {
		this.data = data;
	}

	public AttachmentInputStreamSource(byte[] data) {
		super();
		this.data = data;
	}
	
	

}
